From bc09945cf54db20b4bb66341d832bc6516b9207c Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Sat, 11 Oct 2003 14:41:02 +0000 Subject: [PATCH] bitkeeper revision 1.506 (3f88167eEXnAd-cmzFGwEPmqdJEKDg) xl_block.c: Remove bogus permission checks from xlblk ioctl. --- .../arch/xeno/drivers/block/xl_block.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c b/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c index 12e3657d6a..357c2056a6 100644 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c @@ -152,11 +152,6 @@ int xenolinux_block_release(struct inode *inode, struct file *filep) return 0; } -/* - * handle ioctl calls - * - * individual ioctls are defined in /usr/include/linux/fs.h - */ int xenolinux_block_ioctl(struct inode *inode, struct file *filep, unsigned command, unsigned long argument) @@ -165,13 +160,9 @@ int xenolinux_block_ioctl(struct inode *inode, struct file *filep, struct hd_geometry *geo = (struct hd_geometry *)argument; struct gendisk *gd; struct hd_struct *part; - - DPRINTK("xenolinux_block_ioctl\n"); - - /* check permissions */ - if (!capable(CAP_SYS_ADMIN)) return -EPERM; - if (!inode) return -EINVAL; + /* NB. No need to check permissions. That is done for us. */ + DPRINTK_IOCTL("command: 0x%x, argument: 0x%lx, dev: 0x%04x\n", command, (long) argument, dev); @@ -248,7 +239,7 @@ int xenolinux_block_ioctl(struct inode *inode, struct file *filep, return 0; case CDROMMULTISESSION: - printk("FIXME: support multisession CDs later\n"); + DPRINTK("FIXME: support multisession CDs later\n"); memset((struct cdrom_multisession *)argument, 0, sizeof(struct cdrom_multisession)); return 0; -- 2.30.2